<template>
  <div>
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="item in bannerList">
        <img :src="item.picUrl" alt="" />
      </van-swipe-item>
    </van-swipe>

    <yx-title>
      <template> 全民砍价 </template>
    </yx-title>
  </div>
</template>
<script>
import { getBanner } from "@/utils/http/home";
import { ref, reactive, toRefs } from "vue";

import yxTitle from "@/components/yxTitle.vue";
export default {
  setup(props) {
    const data = reactive({
      bannerList: [],
      //轮播图数据
    });
    getBanner().then((res) => {
      // console.log(res);
      data.bannerList = res.data;
    });

    return { ...toRefs(data) };
  },
  components: {
    yxTitle,
  },
};
</script>
<style lang="scss"></style>
